package router

import (
	"github.com/gin-gonic/gin"
	"video/consts"
	"video/internal/handler"
	"video/pkg"
)

func Router(c *gin.Engine) {
	user := c.Group("/user")
	user.POST("/login", handler.NewUserHandler().Login)

	video := c.Group("/video")
	video.POST("/videoList", handler.NewVideoHandler().VideoList)
	video.Use(pkg.ParseJwtToken(consts.JWT_TOKEN_SECRET))
	video.POST("/upload", handler.UploadVideo)

}
